import request from '@/utils/request'

// 查询审批预算列表
export function listApproveys(query) {
  return request({
    url: '/approveys/approveys/list',
    method: 'get',
    params: query
  })
}

// 查询审批预算详细
export function getApproveys(id) {
  return request({
    url: '/approveys/approveys/' + id,
    method: 'get'
  })
}

// 新增审批预算
export function addApproveys(data) {
  return request({
    url: '/approveys/approveys',
    method: 'post',
    data: data
  })
}

// 修改审批预算
export function updateApproveys(data) {
  return request({
    url: '/approveys/approveys',
    method: 'put',
    data: data
  })
}

// 删除审批预算
export function delApproveys(id) {
  return request({
    url: '/approveys/approveys/' + id,
    method: 'delete'
  })
}

export function handleNo(nid) {
  return request({
    url: '/approveys/approveys/' + nid,
    method: 'delete'
  })
}
export function handleYes(yid) {
  return request({
    url: '/approveys/approveys/' + yid,
    method: 'put'
  })
}
